<!DOCTYPE html>
<html>
<head>
<title>考核设置</title>
<#include "/header.html">
</head>
<body>
<div id="spapp" v-cloak>
	<div v-show="showList">
		<div class="grid-btn">
<!--			<div class="form-group col-sm-2">-->
			<div class="form-group col-sm-2">
				<input class="form-control" id="q_title" v-model="q.title" @keyup.enter="query"
					   placeholder="标题">
			</div>
			<a class="btn btn-default" @click="query">查询</a>
<!--			<#if shiro.hasPermission("assess:set:info")>-->
<!--			<a class="btn btn-primary" @click="detail"><i class="fa fa-eye-slash"></i>&nbsp;详情</a>-->
<!--		   </#if>-->
			<#if shiro.hasPermission("assess:set:save")>
			<a class="btn btn-primary" @click="add"><i class="fa fa-plus"></i>&nbsp;新增</a>
			</#if>
			<#if shiro.hasPermission("assess:set:update")>
			<a class="btn btn-primary" @click="update"><i class="fa fa-pencil-square-o"></i>&nbsp;修改</a>
			</#if>
			<#if shiro.hasPermission("assess:set:delete")>
			<a class="btn btn-primary" @click="del"><i class="fa fa-trash-o"></i>&nbsp;删除</a>
			</#if>

		</div>
	    <table id="jqGrid"></table>
	    <div id="jqGridPager"></div>
    </div>

	<div v-show="!showList" class="panel panel-default">
		<div class="panel-heading">{{title}}</div>
		<form class="form-horizontal">
			<div class="form-group">
				<div class="col-sm-2 control-label">标题</div>
				<div class="col-sm-10">
					<input v-model="set.title"  placeholder="标题" name="title"
						   id="title" class="layui-input" autocomplete="off">
				</div>
			</div>
			<div class="form-group">
				<div class="col-sm-2 control-label">开始日期</div>
				<div class="col-sm-10">
					<input v-model="set.startDate"  placeholder="开始日期" name="startDate"
						   id="startDate" class="layui-input" autocomplete="off">
				</div>
			</div>
			<div class="form-group">
				<div class="col-sm-2 control-label">结束日期</div>
				<div class="col-sm-10">
					<input v-model="set.endDate"  placeholder="结束日期" name="endDate"
						   id="endDate" class="layui-input" autocomplete="off">
				</div>
			</div>
			<div class="form-group">
				<div class="col-sm-2 control-label">总分</div>
				<div class="col-sm-10">
					<input type="number" v-model="set.score"  placeholder="总分" name="score"
						   id="score" class="layui-input" autocomplete="off">
				</div>
			</div>
			<div class="form-group">
				<div class="col-sm-2 control-label">考核说明</div>
				<div class="col-sm-10">
					<textarea type="text" class="form-control" v-model="set.remark" placeholder="考核说明">
					</textarea>
				</div>
			</div>
			<div class="form-group">
				<div class="col-sm-2 control-label">评分标准</div>
				<div class="col-sm-10">
					<textarea type="text" class="form-control" v-model="set.standard" placeholder="评分标准">
					</textarea>
				</div>
			</div>
			<div class="form-group">
				<div class="col-sm-2 control-label">选择考核项</div>
				<div class="col-sm-10">
					<label v-for="item in assessItem" class="checkbox-inline">
						<input type="checkbox" :value="item.id" v-model="set.itemIdList">{{item.name}}
					</label>
				</div>
			</div>

			<div class="form-group">
				<div class="col-sm-2 control-label"></div>
				<input type="button" class="btn btn-primary" @click="saveOrUpdate" value="确定"/>
				&nbsp;&nbsp;<input type="button" class="btn btn-warning" @click="reload" value="返回"/>
			</div>
		</form>
	</div>
</div>

<script src="${request.contextPath}/statics/js/modules/assess/assessSet.js?_${.now?long}"></script>
</body>
</html>